"tempdir 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"time 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
- "toml 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
+ "toml 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)",
"url 0.2.37 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "toml"
-version = "0.1.22"
+version = "0.1.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc-serialize 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)",
Caused by:
could not parse input as TOML
-[..]config:2:1 expected `=`, but found eof
+[..]config:1:2 expected `=`, but found eof
"));
});
warning: crate-type \"bad_type\" was not one of lib|rlib|dylib|staticlib
"));
});
+
+test!(malformed_override {
+ let foo = project("foo")
+ .file("Cargo.toml", r#"
+ [package]
+ name = "foo"
+ version = "0.0.0"
+ authors = []
+
+ [target.x86_64-apple-darwin.freetype]
+ native = {
+ foo: "bar"
+ }
+ "#)
+ .file("src/lib.rs", "");
+
+ assert_that(foo.cargo_process("build"),
+ execs().with_status(101).with_stderr("\
+failed to parse manifest at `[..]`
+
+Caused by:
+ could not parse input as TOML
+Cargo.toml:[..]
+
+"));
+});
"could not find package matching spec `notAValidDep`".to_string()));
});
+
+test!(manifest_with_bom_is_ok {
+ let p = project("foo")
+ .file("Cargo.toml", "\u{FEFF}
+ [package]
+ name = \"foo\"
+ version = \"0.0.1\"
+ authors = []
+ ")
+ .file("src/lib.rs", "");
+ assert_that(p.cargo_process("build").arg("-v"),
+ execs().with_status(0));
+});